home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 853 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: CPU time measurement
  5. Date: Tue, 09 Jan 96 17:44:44 GMT
  6. Organization: none
  7. Message-ID: <821209484snz@genesis.demon.co.uk>
  8. References: <4cs60j$ilb@azure.acsu.buffalo.edu>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4cs60j$ilb@azure.acsu.buffalo.edu>
  15.            naras-r@acsu.buffalo.edu "Ram Prasad" writes:
  16.  
  17. >Hi,
  18. >
  19. >Is there a standard acceptable way of measuring the 
  20. >number of (milli)seconds that different pieces of code take 
  21. >to execute in a system?
  22.  
  23. clock() measures CPU time but there are no guarantees about the resolution
  24. you get from it, it usually depends on the internal clock granularity.
  25.  
  26. >I found "getrusage" in the man pages, but I am not sure if
  27. >that's what I should use.
  28.  
  29. Possibly but you should discuss Unix system services in
  30. comp.unix.programmer.
  31.  
  32. -- 
  33. -----------------------------------------
  34. Lawrence Kirby | fred@genesis.demon.co.uk
  35. Wilts, England | 70734.126@compuserve.com
  36. -----------------------------------------
  37.